Skip to content

LeetCode 17. Letter Combinations of a Phone Number#60

Merged
huyfififi merged 9 commits intomainfrom
leetcode-17-letter-combinations-of-a-phone-number
Mar 23, 2026
Merged

LeetCode 17. Letter Combinations of a Phone Number#60
huyfififi merged 9 commits intomainfrom
leetcode-17-letter-combinations-of-a-phone-number

Conversation

@huyfififi
Copy link
Owner

@huyfififi huyfififi self-assigned this Mar 19, 2026
@huyfififi huyfififi marked this pull request as ready for review March 19, 2026 22:49
std::stack<std::pair<int, std::vector<char>>> combinations_in_progress;
combinations_in_progress.push({0, {}});
while (!combinations_in_progress.empty()) {
auto [digit_index, combination_in_progress] = combinations_in_progress.top();

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

不要なオブジェクトのコピーが走っているところがいくつかありそうです。こことか。std::moveした方が良さそうです。

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ありがとうございます。自分の中で欠けていた視点だったので、参考になりました。

@huyfififi huyfififi merged commit 7dc7868 into main Mar 23, 2026
@huyfififi huyfififi deleted the leetcode-17-letter-combinations-of-a-phone-number branch March 23, 2026 03:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants